package org.jiangpz.excel.merge.process;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

import org.jiangpz.excel.merge.entity.RowEntity;
import org.jiangpz.excel.merge.entity.ToEntity;

public class ProcessFile {
	
	public ArrayList<Object> extract(List<RowEntity> fromEntitylist01,List<RowEntity> fromEntitylist02) {
		List<ToEntity> toEntitylist = new ArrayList<ToEntity>();
		for (int i = 0; i < fromEntitylist01.size(); i++) {
			RowEntity array_element01 = fromEntitylist01.get(i);
			RowEntity array_element02 = fromEntitylist02.get(i);
			RowEntity array_elementOut = fromEntitylist02.get(i);
			
			Method[] methodArray = array_element01.getClass().getDeclaredMethods();
			
			for (int k = 0; k < methodArray.length; k++) {
				String methodNameEnd = methodArray[k].getName().substring(beginIndex, endIndex);
			}
			
			array_elementOut = Util.setValue(array_elementOut, j, cellVal);
		}
		for (RowEntity fromEntity : fromEntitylist) {
			ToEntity toEntity = new ToEntity();
			toEntitylist.add(toEntity);
		}
		ArrayList<Object> allInfo = new ArrayList<Object>();
		allInfo.add(toEntitylist);
		System.out.println("Size:"+fromEntitylist.size());
		return allInfo;
	}
}
